<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<script type="text/javascript">
function fandeng() {
	window.location="login.jsp"
}	
function fanzhu() {
	window.location="main?method=main"
}	
</script>

<button onclick="add()">新增</button>
<table border="1">
	<tr>
		<th>学号</th>
		<th>姓名</th>
		<th>密码</th>
		<th colspan="2">操作</th>
		
	</tr>
	<c:forEach items="${list}" var="s">
		<tr>
			<td>${s.stuNo}</td>
			<td>${s.name}</td>
			<td>${s.password}</td>
			<td><button onclick="update(${s.id})">修改</button></td>
			<td><button onclick="javascript:del(${s.id})" >删除</button></td>
		</tr>	
	</c:forEach>
</table>
<center><button onclick="fandeng()" class="btn">返回登录页面</button>
<button onclick="fanzhu()" class="btn">返回主页面</button></center>	

